<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />

<script type="text/javascript"
	src="<c:url value="/js/html5/html5.min.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/js/respond/respond.min.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/js/PIE/2.0/PIE_IE678.js"/>"></script>

<link href="<c:url value="/css/H-ui.min.css"/>" rel="stylesheet"
	type="text/css" />
<link href="<c:url value="/css/H-ui.admin.css"/>" rel="stylesheet"
	type="text/css" />
<%--<link href="<c:url value="/css/Hui-iconfont/1.0.1/iconfont.css"/> " rel="stylesheet" type="text/css" />--%>
<link href="<c:url value="/css/Hui-iconfont/1.0.1/iconfont.css"/>"
	rel="stylesheet" type="text/css" />
	<%--分页--%>
	<link rel="stylesheet" type="text/css" href="<c:url value="/css/layer/laypage.css"/>">
<title>会员管理</title>
</head>
<body>
	<nav class="breadcrumb">
		<i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>
		会员管理 <span class="c-gray en">&gt;</span> 会员列表<a
			class="btn btn-success radius r mr-20"
			style="line-height: 1.6em; margin-top: 3px"
			href="javascript:location.replace(location.href);" title="刷新"><i
			class="Hui-iconfont">&#xe68f;</i></a>
	</nav>
	<div class="pd-20">
		<div class="text-c">
			<form action="<c:url value="/admin/user/list/0"/>">
				<input type="text" class="input-text" style="width: 250px"
					placeholder="输入会员名称" name="userName"> <input type="text"
					class="input-text" style="width: 250px" placeholder="输入电话"
					name="phoneNumber"> <input type="text" class="input-text"
					style="width: 250px" placeholder="输入邮箱" name="email">
				<button type="submit" class="btn btn-success radius" name="">
					<i class="Hui-iconfont">&#xe665;</i> 搜用户
				</button>
			</form>
		</div>
		<div class="cl pd-5 bg-1 bk-gray mt-20">
			<span class="r">共有数据：<strong>${viewData.count}</strong> 条
			</span>
		</div>
		<div class="mt-20">
			<table
				class="table table-border table-bordered table-hover table-bg table-sort"
				id="content">
				<thead>
					<tr class="text-c">
						<th width="100">用户名</th>
						<th width="90">手机</th>
						<th width="150">邮箱</th>

						<th width="150">实名验证状态</th>
						<th width="150">用户真实姓名</th>
						<th width="150">操作</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${viewData.result}" var="userlist">
						<tr class="text-c">
							<td>${userlist.userName}</td>
							<td>${userlist.phoneNumber}</td>
							<td>${userlist.email}</td>
							<td><c:choose>
									<c:when test="${userlist.isRealNameValidated=='y'}">已通过实名认证</c:when>
									<c:when test="${userlist.isRealNameValidated=='n'}">未实名认证</c:when>
									<c:otherwise>提交实名认证</c:otherwise>
								</c:choose></td>
							<td>${userlist.userRealName}</td>
							<td><a
								href="<c:url value="/admin/user/userDetail?id=${userlist.id }"/>">查看详细</a></td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
			<div id="pagelayer" style=" float: right;margin-top: 10px;"></div>
		</div>
	</div>
	<%--分页--%>
	<script type="text/javascript"  src="<c:url value="/js/laypage/1.2/laypage.js"/>"></script>
	<script type="text/javascript"
		src="<c:url value="/js/jquery/1.9.1/jquery.min.js"/>"></script>
	<script type="text/javascript"
		src="<c:url value="/js/layer/1.9.3/layer.js"/>"></script>
	<script type="text/javascript"
		src="<c:url value="/js/My97DatePicker/WdatePicker.js"/>"></script>
	<script type="text/javascript"
		src="<c:url value="/js/h-ui/2.3/H-ui.js"/>"></script>
	<script type="text/javascript"
		src="<c:url value="/js/h-ui/2.3/H-ui.admin.js"/>"></script>
	<script type="text/javascript">

		$(function(){
			//        分页
			laypage({
				cont: $('#pagelayer'), //容器。值支持id名、原生dom对象，jquery对象,
				pages: "${viewData.pages}", //总页数
				skin: '#5eb95e', //加载内置皮肤，也可以直接赋值16进制颜色值，如:#c00
				groups: "7" ,//连续显示分页数
				skip: true, //是否开启跳页
				curr: "${viewData.page}", //获取hash值为fenye的当前页
				hash: '//', //自定义hash值
				jump: function(e, first){ //触发分页后的回调
					var pagesize = "${viewData.pageSize}";
					var url = e.curr;
					if(!first){//一定要加此判断，否则初始时会无限刷新
//                    location.href = e.curr==1?pagesize : (e.curr-1) * pagesize;
						location.href = url;
					}
				}
			});
		})
	</script>
</body>
</html>